<template>
  <div>
    <el-card style="margin-bottom: 20px">
      <CategorySelector :isForbidden="isShowList"></CategorySelector>
    </el-card>
    <el-card>
      <AttrList v-if="isShowList" @setIsShowList="isShowList = $event" @setAttr="getAttrValue"></AttrList>
      <SaveList v-else :attrValue="attrValue" @setIsShowList="isShowList = $event"></SaveList>
    </el-card>
  </div>
</template>

<script>
import AttrList from './components/AttrList.vue'
import SaveList from './components/SaveList.vue'
export default {
  name: 'Attr',
  components: {
    AttrList,
    SaveList
  },
  data() {
    return {
      isShowList: true,
      attrValue: {}
    }
  },
  methods: {
    getAttrValue(obj) {
      this.attrValue = obj
    }
  }
}
</script>

<style lang="scss" scoped>
</style>

